home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / BC++ Builder / DATA.Z / SAMPREG.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-10  |  2.1 KB  |  58 lines

  1. //---------------------------------------------------------------------------
  2. // Borland C++Builder
  3. // Copyright (c) 1987, 1997 Borland International Inc.  All Rights Reserved.
  4. //---------------------------------------------------------------------------
  5. // Sampreg.cpp
  6. //
  7. // This file registers several of the components which appear on the "Samples"
  8. // Component palette in the C++ Builder IDE.
  9. //---------------------------------------------------------------------------
  10.  
  11. #include <vcl/vcl.h>
  12. #pragma hdrstop
  13. #define REGISTER_ALL_CONTROLS
  14.  
  15.  
  16. #include "source\calendar.cpp"
  17. #include "source\colorgrd.cpp"
  18. #include "source\gauges.cpp"
  19. #include "source\spin.cpp"
  20. #include "source\piereg.cpp"
  21. #include "source\diroutln.cpp"
  22. #include "source\ibreg.cpp"
  23. #include "source\demolbl.cpp"
  24.  
  25.  
  26. namespace Sampreg {
  27.   void __fastcall Register()
  28.   {
  29.     TComponentClass classes[] = { __classid(TCalendar),
  30.                                   __classid(TColorGrid),
  31.                                   __classid(TGauge),
  32.                                   __classid(TSpinButton),
  33.                                   __classid(TSpinEdit),
  34.                                   __classid(TPie),
  35.                                   __classid(TIBEventAlerter),
  36.                                   __classid(TDirectoryOutline),
  37.                                   __classid(TDemoLabel)
  38.                                 };
  39.  
  40.     RegisterComponents("Samples",
  41.                         classes,
  42.                         (sizeof(classes)/sizeof(classes[0])) - 1);
  43.  
  44.     //For the Pie component
  45.     RegisterComponentEditor(__classid(TPie), __classid(TPieEditor));
  46.     RegisterPropertyEditor(__typeinfo(TAngles),
  47.                            NULL,
  48.                            "",
  49.                            __classid(TAnglesProperty));
  50.  
  51.     //For the IBEventAlerter component
  52.     RegisterPropertyEditor(__typeinfo(TStrings),
  53.                            __classid(TIBEventAlerter),
  54.                            "Events",
  55.                            __classid(TIBEventListProperty));
  56.   } // Register
  57. }   // namespace Sampreg
  58.